<%@ page import="org.apache.ibatis.session.SqlSession" %>
<%@ page import="cn.ruituo.util.MyBatisUtil" %>
<%@ page import="cn.ruituo.dao.GradeDao" %>
<%@ page import="cn.ruituo.entity.Grade2" %>
<%@ page import="java.util.List" %>
<%@ page import="cn.ruituo.service.GradeService" %><%--
  Created by IntelliJ IDEA.
  User: oldliu
  Date: 2021/3/22
  Time: 8:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>年级信息</title>
    <style type="text/css">
        ul li{
            list-style: none;
        }
        ul li span{
            margin-left: 5px;
            font-size: 16px;
            background-color: darkgray;
            width: 200px;
        }
    </style>
</head>
<body>
<ul>
 <%
//     SqlSession s= MyBatisUtil.get();
//     GradeDao dao=s.getMapper(GradeDao.class);
     GradeService service=new GradeService();
     List<Grade2> all = service.findALL();
     //MyBatisUtil.close(s);
     for(Grade2 g:all){
 %>
    <li><%=g.getId()%><span><%=g.getGname()%></span></li>
    <%}%>
</ul>
</body>
</html>
